﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PraxisRent.Entities;

namespace PraxisRent.Repository
{
    public class TelefonoPersonaRepository:MasterRepository,ITelefonoPersonaRepository
    {
        public List<TELEFONO_PERSONA> GetAllFromTelefonoPersona()
        {
            var query = from c in context.TELEFONO_PERSONAs.Include("PERSONA")
                        select c;
            return query.ToList();
        }

        public List<TELEFONO_PERSONA> GetAllFromTelefonoPersonaByDniPersona(string dni)
        {
            var query = from c in context.TELEFONO_PERSONAs.Include("PERSONA")
                        where c.PERSONA.Dni.Contains(dni)
                        select c;
            return query.ToList();
        }
    }
}
